﻿<%@ Page Language="C#" MasterPageFile="~/Member/UserManage.master" AutoEventWireup="true"
    CodeFile="LinkList.aspx.cs" Inherits="Member_Link_LinkList" Title="友情链接管理" %>

<%@ Register Src="../../Control/PageNo.ascx" TagName="PageNo" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContInfo" runat="Server">

    <script type="text/javascript">
        function SelectAll()
        {
            // 找到所有的 input 元素
            var ctllist = document.getElementsByTagName("input");
            var objcheckbox= document.getElementById("CheckBox2");     
            for( var i = 0; i< ctllist.length; i++)
            {
                if(ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0 )
                {   
                    if(objcheckbox.checked==true)     
                         ctllist[i].checked = true;
                    else
                         ctllist[i].checked = false;
                }
          
             }
         }
    </script>
    <div class="inkg mar_top">

    <form id="form1" action="">
           <strong class="inkgt">
                友情连接管理</strong>
           <div class="intip mar_top">
                <strong class="intipt">提&nbsp;示：</strong>
                <p>·上传网站logo尽量用标准尺寸88*35大小图片！</p>
               <i class="lt"></i><i class="lb"></i>
            </div>
            <div class="inso mar_top">  
               <table cellpadding="0" cellspacing="0" border="0" width="540">
                <tr>
                    <td>
                        标题名称：
                        <asp:TextBox ID="txtKeyWord" runat="server"></asp:TextBox>
                        公司名称：<asp:TextBox ID="txtCompany" runat="server"></asp:TextBox>
                        <asp:Button ID="btnsubmit" runat="server" Text="立刻查找" OnClick="btnsubmit_Click" CssClass="del" /></td>
                </tr>
            </table>
            </div>
            <div class="intab mar_top" id="intab">
                <ul class="intabt">
                    <li class="intabt2">所有友情连接</li><li class="intabt1"> <asp:HyperLink ID="lnkAdd" runat="server" NavigateUrl="~/member/Link/LinkAdd.aspx">添加友情链接</asp:HyperLink></li>
                </ul>
        <div class="intabc" id="intabc">
            <div class="con" style="display: block">
                        <table cellpadding="0" cellspacing="0" border="0" class="edtb">
                            <thead>
                                <tr>
                                    <td id="xh" align="center" width="40">
                                        <strong>选项</strong>
                                    </td>
                                    <td align="center" width="100">
                                        <strong>网站Logo</strong>
                                    </td>
                                    <td align="center" >
                                        <strong>链接标题</strong>
                                    </td>
                                    <td align="center" width="80">
                                        <strong>链接地址</strong>
                                    </td>
                                    <td align="center" width="80">
                                        <strong>公司名称</strong>
                                    </td>
                                    <td align="center" width="50">
                                        <strong>审核</strong>
                                    </td>
                                    <td align="center" width="50">
                                        <strong>操作</strong>
                                    </td>
                                </tr>
                            </thead>
                            <tbody>
            <asp:Repeater  ID="grdUserLink" runat="server"  > 
                    <ItemTemplate>
                        <tr>
                            <td width="40" align="center">
                                <input runat="server" value='<%# DataBinder.Eval(Container.DataItem,"ID")%>' id="chk" name="chk"
                                    type="checkbox" onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" />
                            </td>
                            <td width="100" align="center">
                                <a href='<%# Eval("Url") %>' target="_blank">
                                <asp:Image ID="Image1" runat="server" Height="35" Width="80" ImageUrl='<%# Eval("Logo") %>' CssClass="table_photo" ToolTip='<%# Eval("Url") %>' /></a>
                            </td>
                            <td  align="center">
                            <a href='<%# Eval("url") %>' target="_blank" style="text-decoration: none">
                                <%# Eval("Name") %>
                            </a>
                            </td>
                            <td align="center" width="80">
                                <%# DataBinder.Eval(Container.DataItem, "Url")%>
                            </td>
                            <td align="center" width="80">
                                <%# Eval("CompanyName").ToString().Length <= 15 ? Eval("CompanyName").ToString() : Eval("CompanyName").ToString().Substring(0, 15) + "..."%>
                            </td>
                            <td align="center" width="50">
                                <%# Eval("Verify").ToString()=="True"?"已审":"未审" %>
                            </td>
                            <td align="center" width="50">
                                <a href='LinkEdit.aspx?ID=<%# Eval("ID")%>&UserID=<%# Eval("UserID") %>'>编辑</a>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater >
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="7">
                                    <p class="zi1">
                                                     <input runat="server" class="checkbox" type="checkbox" id="chkall" name="chkall" onclick="CheckMinoAll();" />
                                        全选
                                        <asp:Button ID="btnDelete" runat="server" Font-Size="9pt" OnClick="btnDelete_Click"
                                            OnClientClick="return CheckSelect();return confirm('你确认要删除吗?');" Text="批量删除" CssClass="del"  />
                                    </p>
                                    <p class="zi2">
                                        <uc1:PageNo ID="PageNo1" runat="server" />
                                    </p>
                                </td>
                            </tr>
                        </tfoot>
                        </table>
                        <input type="hidden" id="CheckedIDS" name="CheckedIDS" value="0" runat="server" />
            </div>
            <asp:Label ID="lblMessage" runat="server" Text="Label" Visible="False"></asp:Label>
        </div>
            </div>
    </form>
        </div>
</asp:Content>
